﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Test Javascript's Boolean Values</title>
    <link rel="stylesheet" type="text/css" href="../common/qunit.css" />
    <script type="text/javascript" src="../common/jquery.js"></script>
    <script type="text/javascript" src="../common/qunit.js"></script>
    <script type="text/javascript" src="../common/commonfuncs.js"></script>
    <script type="text/javascript">
        function demoFalsy() {
            var falsy = [false, undefined, null, NaN, 0, ""];
            for (var index = 0; index < falsy.length; index++) {
                var value = falsy[index];
                ok(!value, wrap4display(value) + " is Falsy");
            }
        }

        function demoTruthy() {
            var truthy = [true, Infinity, -Infinity, 1, -1, " ", "wsu",[]];
            for (var i = 0; i < truthy.length; i++) {
                var value = truthy[i];
                ok(value, wrap4display(value) + " is Truthy");
            }
        }

        $(function () {
            test("truthy values", demoTruthy);
            test("falsy values", demoFalsy);
        });
    </script>
</head>
<body>
    <h1 id="qunit-header">
        Boolean Demonstration</h1>
    <h2 id="qunit-banner">
    </h2>
    <div id="qunit-testrunner-toolbar">
    </div>
    <h2 id="qunit-userAgent">
    </h2>
    <ol id="qunit-tests">
    </ol>
    <div id="qunit-fixture">
        test markup, will be hidden</div>
</body>
</html>
